package com.tf.xx.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tf.xx.entity.User;
import com.tf.xx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/getUser")
    public User getUser() {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("id", 1);
        //queryWrapper.eq("username", "admin");
        List<User> List = userService.list(queryWrapper);
        return userService.getById(1);
    }
}
